package com.shuoyue.ycgk.views.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.shuoyue.ycgk.R;
import com.shuoyue.ycgk.utils.SizeUtil;

import butterknife.BindView;
import butterknife.ButterKnife;


/**
 * Created by Forty'7 on 2019/8/17
 */

public class SimpleProgressDialog extends Dialog {
    @BindView(R.id.textView_progress)
    TextView textViewProgress;
    private Context mContext;


    public SimpleProgressDialog(@NonNull Context context, String title) {
        super(context, R.style.dialog);
        this.mContext = context;
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        View view = View.inflate(context, R.layout.dialog_progress, null);
        setContentView(view);
        ButterKnife.bind(this, view);
        getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        getWindow().setGravity(Gravity.CENTER);

        textViewProgress.setText(title);
    }

}
